//-----------------------------------------------------------------------
// <copyright file="a_SessionService.cs" company="AACECOM">
//     Copyright (c) AACECOM. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections;
using ThoiTrang.Entities;
using ThoiTrang.Data;
    
namespace ThoiTrang.Business
{   
	/// <summary>
	/// 
	/// </summary> 
    public class a_SessionService
    {
        #region a_Session

        public static void Createa_Session(a_Session a_Session)
        {            
            try
            {
                a_SessionDAO a_SessionDAO = new a_SessionDAO();
                a_SessionDAO.Createa_Session(a_Session);
            }            
            catch (Exception ex)
            {                
                throw ex;
            }
        }

        public static void Createa_Session(a_Session a_Session, out bool isOk)
        {
            try
            {
                a_SessionDAO a_SessionDAO = new a_SessionDAO();
                a_SessionDAO.Createa_Session(a_Session,out isOk);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        } 

        public static void Updatea_Session(a_Session a_Session)
        {            
            try
            {
                a_SessionDAO a_SessionDAO = new a_SessionDAO();
                a_SessionDAO.Updatea_Session(a_Session);
            }           
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        public static void Deletea_Session(string sessionID)
        {            
            try
            {
                a_SessionDAO a_SessionDAO = new a_SessionDAO();
                a_SessionDAO.Deletea_Session(sessionID);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }
        
        public static a_Session Geta_Session(string sessionID)
        {            
            try
            {
                a_SessionDAO a_SessionDAO = new a_SessionDAO();
                return a_SessionDAO.Geta_Session(sessionID);                
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }                

        public static a_SessionCollection Geta_SessionList(a_SessionColumns orderBy, OrderDirection orderDirection)
        {            
            try
            {
                a_SessionDAO a_SessionDAO = new a_SessionDAO();
                return a_SessionDAO.Geta_SessionList(orderBy, orderDirection);
            }            
            catch (Exception ex)
            {
               throw ex;
            }
        }        

        public static a_SessionCollection Geta_SessionList(a_SessionColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {            
            try
            {
                a_SessionDAO a_SessionDAO = new a_SessionDAO();
                return a_SessionDAO.Geta_SessionList(orderBy, orderDirection, page, pageSize, out totalRecords);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        #endregion
    }
}